package jym.tan.tmdb.bean;

import java.io.Serializable;
import java.util.List;

import com.google.gson.annotations.SerializedName;

/**
 * The Class MovieSearchWrapper.
 * <p>
 * 	The properties are:
 * 	<ul>
 * 		<li>page</li>
 * 		<li>results</li>
 * 		<li>total_pages</li>
 * 		<li>total_results</li>
 * 	</ul>
 * </p>	 
 * @author Tanmoy 
 */
public class MovieSearchWrapper implements Serializable {

	private static final long serialVersionUID = 7898915345169029183L;
	
	@SerializedName("page")
	private int page;
	
	@SerializedName("results")
	private List<MovieSearch> results;
	
	@SerializedName("total_pages")
	private int totalPages;
	
	@SerializedName("total_results")
    private int totalResults;
    
    /**
     * Default Constructor.
     */
    public MovieSearchWrapper() {
		
	}

	/**
	 * Gets the page.
	 *
	 * @return 
	 * 		The page
	 */
	public int getPage() {
		return page;
	}

	/**
	 * Sets the page.
	 *
	 * @param page 
	 * 		The new page
	 */
	public void setPage(int page) {
		this.page = page;
	}

	/**
	 * Gets the {@link List} of {@link MovieSearch} objects.
	 *
	 * @return 
	 * 		The <code>List</code> of <code>MovieSearch</code> object
	 */
	public List<MovieSearch> getResults() {
		return results;
	}

	/**
	 * Sets the {@link List} of {@link MovieSearch} objects.
	 *
	 * @param results 
	 * 		The new <code>List</code> of <code>MovieSearch</code> object
	 */
	public void setResults(List<MovieSearch> results) {
		this.results = results;
	}

	/**
	 * Gets the total pages.
	 *
	 * @return 
	 * 		The total pages
	 */
	public int getTotalPages() {
		return totalPages;
	}

	/**
	 * Sets the total pages.
	 *
	 * @param totalPages 
	 * 		The new total pages
	 */
	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}

	/**
	 * Gets the total results.
	 *
	 * @return 
	 * 		The total results
	 */
	public int getTotalResults() {
		return totalResults;
	}

	/**
	 * Sets the total results.
	 *
	 * @param totalResults 
	 * 		The new total results
	 */
	public void setTotalResults(int totalResults) {
		this.totalResults = totalResults;
	}    
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {	
		StringBuilder builder = new StringBuilder();
		builder.append("{").
			append("page:").append(page).
			append(",").
			append("results:").append(results).
			append(",").
			append("total_pages:").append(totalPages).
			append(",").
			append("total_results:").append(totalResults).
			append("}");
		return builder.toString();
	}
}
